﻿using System;

namespace YArchitech.HVAC
{
	public class PropertyOrderPair : IComparable
	{
		public string Name
		{
			get
			{
				return this._name;
			}
		}

		public PropertyOrderPair(string name, int order)
		{
			this._order = order;
			this._name = name;
		}

		public int CompareTo(object obj)
		{
			int order = ((PropertyOrderPair)obj)._order;
			if (order == this._order)
			{
				string name = ((PropertyOrderPair)obj)._name;
				return string.Compare(this._name, name);
			}
			if (order > this._order)
			{
				return -1;
			}
			return 1;
		}

		private int _order;

		private string _name;
	}
}
